<template>
  <div id="app">
    <img alt="Vue logo" src="./assets/logo.png">
    <HelloWorld msg="Welcome to Your Vue.js App"/>
  </div>
</template>

<script>
import HelloWorld from './components/HelloWorld.vue'
import {mapState,mapGetters} from 'vuex'
 
export default {
  name: 'App',
  components: {
    HelloWorld
  },
  created:function(){
  console.log(this.$store.state.name)
  console.log(this.$store.getters.name2)
  console.log('万事皆有因果')
  console.log( this.$store.state.count)
  console.log(this.count)
  console.log(this.todoDone)
  console.log(this.todoDoneCount)
  console.log(this.$store.getters.shopinfoRight)
  console.log(this.$store.getters.shopinfounRight)
  console.log(this.$store.state.name)
  // this.$store.commit('updateName','你好')
  this.$store.dispatch('getName','5354132141')
  console.log(this.$store.state.name)

},
computed:{
...mapState(['count']),
...mapGetters(['todoDone','todoDoneCount'])
}
}

</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
